package com.zxl.finance.controller;

import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @auther: zxl
 * @creater: 2018-07-13
 * @description: controller的demo.  @RestController 是@ResponseBody和@Controller的组合注解。
 **/
@RestController
public class DemoController {

    @ApiOperation(value = "demo的index",notes = "模拟测试用，没有实际意义")
    @ApiImplicitParam(name = "id", value = "用户ID", required = true, dataType = "String", paramType = "path")
    @RequestMapping(value = "user/{id}", method = RequestMethod.GET)
    public String index(@PathVariable(value = "id") String id){
        return "ok";
    }
}
